package com.example.springlearn.controller;

import com.example.springlearn.service.UserService;
import com.example.springlearn.service.impl.UserServiceImpl;
import com.example.springlearn.util.redis.StringUtil;
import com.example.springlearn.util.redis.ToolsUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;
import java.util.Map;

@Slf4j
@Controller
public class WelcomeController {

    @Resource
    UserService userService;

    @GetMapping("/")
    public String Welcome(Map<String, Integer> map) {

        map.put("userNum", userService.countUsers());

        return "index";
    }

}
